package com.goalias.controller;

import com.goalias.resp.Result;
import com.goalias.service.IArchiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/content/archive")
public class ArchiveController {
    @Autowired
    private IArchiveService archiveService;

    @GetMapping("/countList")
    public Result getArchiveCountList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10")Integer pageSize){
        return archiveService.getArchiveCountList(pageNum, pageSize);
    }

    @GetMapping("/getList")
    public Result getArchiveList(@RequestParam(defaultValue = "1")Integer pageNum, @RequestParam(defaultValue = "10")Integer pageSize){
        return archiveService.getArchiveList(pageNum, pageSize);
    }
}
